package com.yungu.swift.admin.route.order;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.order.model.param.AdminOrderParam;
import com.yungu.swift.order.service.OrderAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : cuixiuyin
 * @date : 2019/7/17
 */
@Slf4j
@RestController
@RequestMapping("/admin/v1/order/taxi")
@Api(value = "【订单管理】", tags = "出租车订单操作接口")
public class OrderTaxiAdmin {

    @Reference
    private OrderAdminService orderAdminService;

    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ApiOperation(value = "出租车订单新建", httpMethod = "POST")
    public ResponseData<Boolean> create(AdminOrderParam adminOrderParam) {
        return orderAdminService.createOrder(adminOrderParam);
    }
}
